/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.vaadin.demo.dashboard;

import com.quick.global.GlobalConstants;
import com.vaadin.event.LayoutEvents;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.*;

/**
 *
 * @author suyogn
 */
public class LeadershipView extends VerticalLayout implements View, LayoutEvents.LayoutClickListener{
    
    
    private HorizontalLayout row ;
    
    @Override
    public void enter(ViewChangeEvent event) {
        setSizeFull();
        addStyleName("schedule");
        setMargin(false);
        setSizeFull();
    }
    
    
    public LeadershipView()
    {
        
    /* HorizontalLayout topDummy = new HorizontalLayout();
        topDummy.setWidth("100%");
        topDummy.setSpacing(true);
        topDummy.setMargin(true);
        topDummy.addStyleName("whiteBg");
        
        Label dummyWhiteLabel = new Label(GlobalConstants.emptyString);
        topDummy.addComponent(dummyWhiteLabel);
        topDummy.setComponentAlignment(dummyWhiteLabel, Alignment.MIDDLE_LEFT);
        topDummy.setExpandRatio(dummyWhiteLabel, 1);
        
        addComponent(topDummy);
        
        final Label title = new Label("Leadership");
        title.setSizeUndefined();
        title.addStyleName("selectedMenuBanner");
        
        HorizontalLayout top = new HorizontalLayout();
        top.setWidth("100%");
        top.setSpacing(true);
        top.setMargin(true);
        top.addStyleName(GlobalConstants.toolbar_style);
        top.addStyleName("selectedMenuBanner");
        top.addStyleName("lightGrayFourSideBorder");
        
        addComponent(top);
        top.addComponent(title);
        top.setComponentAlignment(title, Alignment.MIDDLE_LEFT);
        top.setExpandRatio(title, 1); */

      
        row = new HorizontalLayout();
        row.setHeight("100%");
        row.setWidth("100%");
        row.setMargin(new MarginInfo(true, true, false, true));
        row.setSpacing(true);
        
        Panel p = new Panel();
        p.setSizeFull();
        p.setContent(row);
        //p.addStyleName("fourSideWhiteBorder");
        
        addComponent(p);
        setExpandRatio(p, 1.5f);
        setComponentAlignment(p, Alignment.MIDDLE_CENTER);
        
        //Label about = new Label(GlobalConstants.getProperty(GlobalConstants.ABOUT), ContentMode.PREFORMATTED);
        Label about = new Label("<hr>If you can dream it, you can do it.</hr>" +
"<hr>	This one quote personifies Dr. Sunil Karad and beautifully explains all his achievements. Not only did he dream big, but also had the perseverance to passionately follow them. The list of achievements is too long to compile and so, the few important achievements have been highlighted in this effort.\n" +
"It begins from coming to Pune at a tender age and then, with self study and hard work, being a part of the glorious Jnana Prabodhini School  a feat not easy to achieve. This was the first step to the long ever growing path of accomplishments to follow. Each one of the projects he envisioned soon became a magnificent reality.</hr>"
                + "<P>He selected Alandi, a pilgrim town near Pune, as the location for his first ever project of an engineering college, shocking many experienced academicians. The Maharashtra Academy of Engineering college, since then, has been a centre of excellence in engineering education. It went on to be the first ever engineering college under the University of Pune to be ISO 9001 certified. Though all the following projects have some history behind its inception, the two institutes which are worth mentioning are the Vishwashanti Gurukul and the MIT Institute of Design; both established on the banks of the Mula Mutha river, in the serene environment of Rajbaug, Pune. </P>" +
"\n" +
"<P>The Vishwashanti Gurukul, offering IB and IGCSE curriculums to the students is a unique blend of high- end infrastructural facilities, international curriculum and Indian Culture and ethos, thus developing the students to be global citizens of tomorrow. The MIT Institute of Design, established under the able guidance of Honarable Prof. H. Kumar Vyas was another dream come true. As Dr. Sunil whole heartedly agrees, After a few meetings with Prof Vyas, it was evident to him that my knowledge about Design was very limited. But, I think he was impressed with the passion and sincerity of my team than their knowledge about design; and so, he agreed to be the guide for this venture.</P>" +
"<P>	Nick has created web and mobile experiences for \n" +
"Fortune 500 companies including Adobe, Intel, REI, Boeing,\n" +
"Google, and Oprah.com. He lives and plays in Seattle, Washington,\n" +
"where he is the Senior Manager of User Experience at Amazon AWS, \n" +
"a highly reliable, scalable, low-cost infrastructure platform \n" +
"in the cloud."
                + "	Nick Finck is a user experience professional who has\n" +
"worked in the web industry for over a decade. He specializes\n" +
"in information architecture, interaction design, usability and\n" +
"user research for web and mobile.\n" +
"\n" +
"	Nick has created web and mobile experiences for \n" +
"Fortune 500 companies including Adobe, Intel, REI, Boeing,\n" +
"Google, and Oprah.com. He lives and plays in Seattle, Washington,\n" +
"where he is the Senior Manager of User Experience at Amazon AWS, \n" +
"a highly reliable, scalable, low-cost infrastructure platform \n" +
"in the cloud.</P>", ContentMode.HTML);
        about.setWidth("100%");
        //about.addStyleName("formatText");
        
        VerticalLayout aboutLayout = new VerticalLayout();
        aboutLayout.setSizeFull();
        aboutLayout.addComponent(about);
        
        row.addComponent(aboutLayout);
        row.setExpandRatio(aboutLayout, 2.5f);
        
        VerticalLayout awards = new VerticalLayout();
        awards.setHeight("100%");
        awards.setWidth("100%");
        awards.setSpacing(true);
        awards.setMargin(true);
        awards.addStyleName("leachBg");
        
        Label a1= new Label("<b>Vishwashanti Gurukul</b>", ContentMode.HTML);
        Label a2= new Label("<b>Maharashtra Academy of Engineering</b>", ContentMode.HTML);
        Label a3= new Label("<b>MIT Institute of Design</b>", ContentMode.HTML);
        Label a4= new Label("<b>MIT School of Telecom Management</b>", ContentMode.HTML);
        Label a5= new Label("<b>MIT School of Distance Education</b>", ContentMode.HTML);
        Label a6= new Label("<b>MIT Piping Design and Engineering Centre</b>", ContentMode.HTML);
        
        awards.addComponent(a1);
        awards.addComponent(a2);
        awards.addComponent(a3);
        awards.addComponent(a4);
        awards.addComponent(a5);
        awards.addComponent(a6);
        
        VerticalLayout awardsOuter = new VerticalLayout();
        awardsOuter.setHeight("100%");
        awardsOuter.setWidth("100%");
        awardsOuter.setSpacing(true);
        
        awardsOuter.addComponent(new Label("<h3><b>Institutes under his leadership</b><h3>", ContentMode.HTML));
        awardsOuter.addComponent(awards);
        awardsOuter.setExpandRatio(awards,2);
        
        row.addComponent(awardsOuter);        
        row.setExpandRatio(awardsOuter, 1.5f);
        row.setComponentAlignment(awardsOuter, Alignment.TOP_RIGHT);

    }

    private CssLayout createPanel(Component content) {
        CssLayout panel = new CssLayout();
        panel.setSizeFull();
        panel.addComponent(content);
        return panel;
    }

   

    @Override
    public void layoutClick(LayoutEvents.LayoutClickEvent event) 
    {
        Component c = event.getComponent();
        
    }
}
